package tv.youxing.android.utils;

import com.anupcowkur.reservoir.Reservoir;
import com.anupcowkur.reservoir.ReservoirGetCallback;
import com.anupcowkur.reservoir.ReservoirPutCallback;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;

/**
 * Created by Administrator on 2017/6/23.
 */

public class ReservoirUtils {

    public static void putString(final String valName, String val) {
        Reservoir.putAsync(valName, val, new ReservoirPutCallback() {
            @Override
            public void onSuccess() {
                System.out.println("储存 "+valName+" 成功");
            }

            @Override
            public void onFailure(Exception e) {
                System.out.println("储存 "+valName+" 失败:"+e.getMessage());
            }
        });
    }


    public static String getString(String valName) {
        Type resultType = new   TypeToken<String>(){}.getType();

        return "";
    }

}
